:root {
  font-family: "PingFang SC", "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color: #0f172a;
  background-color: #eef2f6;
  --sidebar-width: 280px;
  --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #14243f 100%);
  --sidebar-border: rgba(148, 163, 184, 0.18);
  --sidebar-text: rgba(226, 232, 240, 0.82);
  --primary: #2563eb;
  --primary-soft: rgba(37, 99, 235, 0.1);
  --text-muted: #64748b;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --shadow-soft: 0 16px 40px -28px rgba(15, 23, 42, 0.38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #e2e8f0;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: none;
  cursor: pointer;
}

.admin-shell,
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
}

.admin-sidebar,
.app-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-logo a,
.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title,
.sidebar-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f8fafc;
}

.brand-subtitle,
.sidebar-description {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.66);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0;
}

.sidebar-summary p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.65);
}

.sidebar-group {
  display: grid;
  gap: 10px;
}

.sidebar-group-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.6);
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  color: rgba(226, 232, 240, 0.72);
}

.sidebar-link:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #f8fafc;
}

.sidebar-link.is-active {
  background: rgba(37, 99, 235, 0.28);
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.sidebar-link-label {
  font-weight: 600;
  font-size: 14px;
}

.sidebar-link-caption {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.58);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.6);
}

.sidebar-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-quick-link {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  color: rgba(226, 232, 240, 0.78);
  font-size: 12px;
}

.admin-main,
.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-header,
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 36px;
  background: rgba(248, 250, 252, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(18px);
}

.header-leading,
.topbar-left {
  display: grid;
  gap: 8px;
}

.topbar-title,
.header-leading h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.topbar-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.header-leading p,
.topbar-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 520px;
}

.header-actions,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search,
.topbar-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.header-search input,
.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  min-width: 180px;
}

.pill-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 12px 24px -18px rgba(37, 99, 235, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pill-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -16px rgba(37, 99, 235, 0.9);
}

.pill-button.ghost,
.ghost-button.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.36);
  box-shadow: none;
}

.avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #1e293b;
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.admin-content,
.app-content {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px clamp(24px, 3vw, 52px);
  display: grid;
  gap: 28px;
  align-content: start;
}

.page-stack {
  display: grid;
  gap: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h2,
.page-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.page-header p {
  margin: 6px 0 0;
  color: var(--text-muted);
  max-width: 520px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.card {
  background: var(--surface);
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-soft);
}

.panel {
  background: var(--surface);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid rgba(203, 213, 225, 0.4);
}

.summary-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
  background: var(--surface-alt);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 6px;
}

.stat-card .value {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
}

.stat-card .label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-card .hint {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
}

.quick-links,
.action-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.quick-links li,
.action-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.info-banner {
  border-radius: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  text-align: left;
}

th {
  background: var(--surface-alt);
  font-weight: 600;
}

button.primary {
  background: var(--primary);
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
}

button.secondary {
  background: var(--text-muted);
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
}

button.danger {
  background: #ef4444;
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-weight: 600;
  color: #0f172a;
}

.form-field input,
.form-field select,
.form-field textarea {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 10px 12px;
  background: #ffffff;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

